package com.solution.admin.customer.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.solution.admin.customer.dao.MarketLevelDao;
import com.solution.admin.customer.entity.MarketLevelEntity;
import com.solution.common.dao.impl.BaseDaoImpl;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 市场等级配置DAO实现
 * @author solin
 * @date 2017-09-16 23:52:38
 */
@Repository
public class MarketLevelDaoImpl extends BaseDaoImpl<MarketLevelEntity> implements MarketLevelDao {

	/**
	 * 保存市场等级配置信息
	 * @param ebMarketLevelEntity
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:52:38
	 */
	@Override
	public long saveEbMarketLevel(MarketLevelEntity ebMarketLevelEntity) {
		return super.insert(ebMarketLevelEntity);
	}

	/**
	 * 分页查询市场等级配置信息
	 * @param pageParam 分页对象
	 * @param ebMarketLevel 分页参数
	 * @return PageBean 分页参数及数据
	 * @author solin
	 * @date 2017-09-16 23:52:38
	 */
	public PageBean listEbMarketLevelPage(PageParam pageParam, Map<String, Object> param) {
		return super.listPage(pageParam, param);
	}

	/**
	 * 更新市场等级配置
	 * @param ebMarketLevelEntity
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:52:38
	 */
	@Override
	public int updateEbMarketLevel(MarketLevelEntity ebMarketLevelEntity) {
		return super.update(ebMarketLevelEntity);
	}

	/**
	 * 删除市场等级配置
	 * @param ebMarketLevelId
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:52:38
	 */
	public int deleteEbMarketLevelById( Long id) {
		return super.deleteById(id);
	}
	
	/**
	 * 根据条件查询市场等级配置
	 * @param param
	 * @return
	 * @author solin
	 * @date 2017-09-16 23:52:38
	 */
	@Override
	public List<MarketLevelEntity> listEbMarketLevel( Map<String, Object> param) {
		return super.listBy(param);
	}
}
